package com.jolestar.yayaweibotong.util;

import java.util.regex.Pattern;

import org.apache.commons.lang.RandomStringUtils;
import org.apache.commons.lang.math.RandomUtils;
import org.apache.commons.validator.EmailValidator;

/**
 * 
 * @author jolestar@gmail.com
 * 
 */
public class YaYaUtils {

	public static final String RANDOM_STR_SEED = "abcdefghigklmnopqrstuvwxyzABCDEFGHIGKLMNOPQRSTUVWXYZ1234567890";

	public static final boolean isValidEmail(String email) {
		return EmailValidator.getInstance().isValid(email);
	}

	public static final String randomString(int count) {
		return RandomStringUtils.random(count, RANDOM_STR_SEED);
	}
}
